<template>
  <div>
  <el-table
    :data="tableData"
    border
    style="width: 100%">
    <el-table-column
      fixed
      prop="time"
      label="日期">
     
    </el-table-column>
    <el-table-column
      prop="name"
      label="姓名">
     
    </el-table-column>
    <el-table-column
      prop="tld"
      label="省份">
      
    </el-table-column>
    <el-table-column
      prop="age"
      label="年龄"
     
    </el-table-column>
    <el-table-column
      prop="zip"
      label="邮编">
    
    </el-table-column>
    <el-table-column
       label="操作">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
        <el-button type="text" size="small">编辑</el-button>
      </template>
    </el-table-column>
  </el-table>

  </div>
</template>

<script>
import axios from 'axios';
import bmock from '../util/mock';
import leftbar from '../components/navbar'
  export default {
    methods: {
      handleClick(row) {
        axios.get("http://gp.cn").then(res => {
         
                console.log(res.data);
            }
        );
      }
    },

    data() {
      return {
        tableData: []
      }
    },
    created(){
        axios.get("http://g.cn").then(res => {
            this.tableData=res.data.navbar
                console.log(res.data);
            }
        );
    },
     components:{
        leftbar:leftbar
    }
  }
</script>